function markfocus(id){
	for(var i=1;i<=id;i++){
	    var target = document.getElementById("you"+i);
		target.className="yes";
	}
	document.getElementById("score").innerHTML=id+"星";
}
function markblur(id){
	for(var i=1;i<=id;i++){
	    var target = document.getElementById("you"+i);
		target.className="no";	
	}
	document.getElementById("score").innerHTML="";
}
function markclick(id){
	for(var i=1;i<=id;i++){
	    var target = document.getElementById("you"+i);
		target.className="yes";	
	}
	document.getElementById("score").innerHTML=id+"星";
	for(var i=1;i<=5;i++){
		var target = document.getElementById("you"+i);
	    target.onmouseover="";
		target.onmouseout="";
		target.onclick="";	
	}
}
function commetfocus(){
    document.getElementById("commet").innerHTML="";	
}
function checkfocus(){
    document.getElementById("checkcode").value="";
}
function createcommet(id){
	var reply = document.getElementById("reply"+id);
	var target = document.getElementById("discuss"+id);
	reply.innerHTML="收起这次回复";
	reply.setAttribute("onclick","deletecommet("+id+")");
	var commet = document.createElement("div");
	commet.className="bookcommet";
	commet.id="bookcommet"+id;
	commet.innerHTML= "<textarea id='commet'onfocus='commetfocus()'>与内容无关的评论将被删除，严重者禁用帐号</textarea><div class='commet'><div class='box-search_input'><b class='shadow-x'></b><b class='shadow-y'></b><input type='text'value='输入验证码'onfocus='checkfocus()'id='checkcode'></div><div id='random'class='checkcode'style='height:30px; margin-left:50px'></div><a href='javascript:createCode()'>看不清，换一张</a><span class='corner box-search_btn clearfix'style=' float:right; margin-top:10px;'><b class='r'></b><b class='l'></b><button class='m'type='submit'hidefocus='true'onclick='selectEngine(1)'>发表</button></span></div>";
	target.appendChild(commet);
}
function deletecommet(id){
	var bookcommet = document.getElementById("bookcommet"+id);
	var target = document.getElementById("discuss"+id);
	var reply = document.getElementById("reply"+id);
	target.removeChild(bookcommet);
	reply.setAttribute("onclick","createcommet("+id+")");
	reply.innerHTML="回复这条评论";
}